package com.lichongbing.lyoggl.mapper;

import com.lichongbing.lyoggl.model.Subscription;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

/**
 * @Entity com.lichongbing.lyoggl.model.Subscription
 */
@Component
public interface SubscriptionMapper extends BaseMapper<Subscription> {
   //SELECT * from a where id = (SELECT max(id) FROM a);
   @Select("select distinct expire from subscription where uid = #{uid} and oderid = (SELECT max(oderid) FROM subscription)")
   String getSubscriptions(String uid, String storeid);
}
